package org.rency.crawler.dal.entity;

import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.index.CompoundIndex;
import org.springframework.data.mongodb.core.index.CompoundIndexes;
import org.springframework.data.mongodb.core.mapping.Document;

/**
 * 描述: 代理池<br>
 * 最近修改时间:2018/1/29 16:22<br>
 *
 * @author CaiyuRen
 * @version V1.0
 * @since 2018/1/29 16:22
 */
@Document(collection = "ProxyPools")
@CompoundIndexes({
    @CompoundIndex(name = "uidx_address", def = "{'ipAddress':1,'port':1}", unique = true)})
public class ProxyPoolsDO extends BaseDO{

  @Id
  private String id;

  private String ipAddress;

  /**
   * 端口
   */
  private int    port;

  /**
   * 协议
   */
  private String protocol;

  /**
   * 代理用户名
   */
  private String username;

  /**
   * 代理密码
   */
  private String passwd;

  /**
   * 速度
   */
  private double speed;

  /**
   * 优先级
   */
  private int    priority;

  /**
   * 国家
   */
  private String country;

  /**
   * 来源域名
   */
  private String orgiHost;

  /**
   * 是否启用
   */
  private String enable;

  private String remark;

  public String getId() {
    return id;
  }

  public void setId(String id) {
    this.id = id;
  }

  public String getIpAddress() {
    return ipAddress;
  }

  public void setIpAddress(String ipAddress) {
    this.ipAddress = ipAddress;
  }

  public int getPort() {
    return port;
  }

  public void setPort(int port) {
    this.port = port;
  }

  public String getProtocol() {
    return protocol;
  }

  public void setProtocol(String protocol) {
    this.protocol = protocol;
  }

  public String getUsername() {
    return username;
  }

  public void setUsername(String username) {
    this.username = username;
  }

  public String getPasswd() {
    return passwd;
  }

  public void setPasswd(String passwd) {
    this.passwd = passwd;
  }

  public double getSpeed() {
    return speed;
  }

  public void setSpeed(double speed) {
    this.speed = speed;
  }

  public int getPriority() {
    return priority;
  }

  public void setPriority(int priority) {
    this.priority = priority;
  }

  public String getCountry() {
    return country;
  }

  public void setCountry(String country) {
    this.country = country;
  }

  public String getOrgiHost() {
    return orgiHost;
  }

  public void setOrgiHost(String orgiHost) {
    this.orgiHost = orgiHost;
  }

  public String getEnable() {
    return enable;
  }

  public void setEnable(String enable) {
    this.enable = enable;
  }

  public String getRemark() {
    return remark;
  }

  public void setRemark(String remark) {
    this.remark = remark;
  }
}
